/**
 * 
 */
package truerefactor.refactor;

import java.util.List;

import truerefactor.graph.ClassNode;
import truerefactor.graph.CodeGraph;
import truerefactor.graph.CodeNode;

/**
 * An Implemenation of the Add Paramenter Refactoring Technique
 * 
 * @author Isaac
 */
public class AddParameter extends Refactoring {

    /**
     * 
     */
    public AddParameter() {
        this.name = "Add Parameter";
        this.description = "";
    }
    
    /*
     * (non-Javadoc)
     * @see
     * truerefactor.refactor.Refactoring#execute(truerefactor.graph.CodeNode
     * [])
     */
    @Override
    public void execute(CodeGraph graph)
    {
        // 1. Check to see whether this method signature is implemented by a
        // superclass or subclass. If it is, carry out these steps for each
        // implementation.

        // 2. Declare a new method with the added parameter. Copy the old body
        // of the code over to the new method.
        // a. If you need to add more than one parameter, it is easier to add
        // them at the same time.

        // 3. Change the body of the old method so that it calls the new one
        // a. If you only have a few references, you can reasonably skip this
        // step
        // b. You can supply any value for the parameter, but usually you use
        // null for object parameter and a clearly odd value for built-in types.
        // It's often a good idea to use something other than zero for numbers
        // so you can spot this case more easily

        // 4. Find all references to the old method and change them to refer to
        // the new one.

        // 5. Remove the old method.
        // a. If the old method is part of the interface and you cannot remove
        // it, leave it in place and mark it as deprecated.

    }
}
